<!--
 * @LastEditors: yuSeen
 * @LastEditTime: 2021-11-24 14:46:53
 * 为多选项单选模块设定值
-->
<template>
  <div class="item">
    <div class="tit">{{ title }}：</div>
    <div class="input">
      <div class="input-line">
        <span class="sp1" v-for="item in list" :key="item.value">
          <input
            class="radio"
            :name="title"
            :checked="attr[ckey] == item.value"
            @click="attr[ckey] = item.value"
            type="radio"
          />
          {{ item.name }}
        </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    name: 'setRadioValueAttr',
    props: {
      attr: {
        type: Object
      },
      ckey: {
        type: String
      },
      list: {
        type: Array
      },
      title: {
        type: String
      }
    }
}
</script>